import { LocalizationContext, MenuItem } from "../../core";

import InfoIcon from "./InfoIcon";
import { RenderShowPropertiesProps } from "./ShowProperties";
import { FC, useContext } from "react";

const ShowPropertiesMenuItem: FC<RenderShowPropertiesProps> = ({ onClick }) => {
  const l10n = useContext(LocalizationContext);
  const label =
    l10n && l10n.properties
      ? l10n.properties.showProperties
      : "Show properties";

  return (
    <MenuItem icon={<InfoIcon />} onClick={onClick}>
      {label}
    </MenuItem>
  );
};

export default ShowPropertiesMenuItem;
